<?php
/*
Copyright FLV Hosting
*/

	require '../config.php' ;
	//if(!isset($_SERVER['PHP_AUTH_USER']) || ($_SERVER['PHP_AUTH_USER']!=_ADMIN_LOGIN || $_SERVER['PHP_AUTH_PW'] != _ADMIN_PASSWORD)) {
	   //header('WWW-Authenticate: Basic realm="Administration"');
	   //header('HTTP/1.0 401 Unauthorized');
	   //echo '<p><center><b>This site requires a valid login and password.</b></center>';
	   //exit;
	 //}

	$fld = !$_REQUEST[fld] ? '../images' : '../images/' . escapeshellcmd($_REQUEST[fld]); 


?>
<html>
<head>
<title>Images manager</title>
<style type="text/css" title="">
.usual {font-family: Arial; font-weight: bold; font-size: 8pt;}
.inv_form {padding: 0; margin: 0;}
</style>
</head>
<body>
<table align="center" width=100% height=100% border=0 cellspacing=2 cellpadding=2>
	<tr>
		<td width="50%" style="border: 1px solid maroon; height: 270px;">
			<iframe name="imgholder" src="./img_library_left.php" width="100%" height="100%" scrolling="yes" frameborder=1></iframe>
		</td>
		<td width="50%" style="border: 1px solid maroon; height: 270px;">
			<iframe name="imgshow" src="" width="100%" height="100%" scrolling="yes" frameborder=1></iframe>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center">
			<form method=post target="imgholder" action="img_library_left.php" class="inv_form" onsubmit="return this.make_fld.value ? true : false;">
			<input type="text" name="make_fld" class="usual"  style="width: 200px;"> <input type="submit" name="" value="create new folder" class="usual">
			</form>

			<form method=post target="imgholder" action="img_library_left.php" class="inv_form"  enctype="multipart/form-data" name="huiform">
			<input type="file" name="u_file" value="" class="usual" style="width: 150px;"> <input type="button" name="" value="upload to current folder" class="usual" onclick="var hui = imgholder.document.all.selform.fld.options[imgholder.document.all.selform.fld.selectedIndex].value; this.form.fld.value = hui; this.form.submit(); imgholder.document.all.total.innerHtml = '<center><b>working</b></center>';">
			<input type="hidden" name="fld" value="">
			</form>
			
			<input type="button" onclick="self.returnValue = null; self.close();" value="cancel" class="usual">
		</td>
	</tr>
</table> 
</body>
</html>